const Data = require("./0913_TRACLUS_FROGMAN.json");
const models = require("./Models");
const DBSCAN = require("./MyDbscan");
const DouglasPeucker = require("./Douglas-Peucker");
const fs = require("fs-extra");
const path = require("path");
const lodash = require("lodash");
let dbscan_myversion = DBSCAN.cluster924;
// debugger
let trajectories_dped = Data.trajectories.map(e => DouglasPeucker.simplifyDouglasPeucker(e, (100 * 100) ** 2));
// debugger
let shexians = models.Shexian.getShexiansFromTrajectories(trajectories_dped);
let clusteres = dbscan_myversion(shexians);
debugger
clusteres = clusteres.map(e => Array.from(e));
fs.writeFile(path.join(__dirname, "./KKK.json"), JSON.stringify(clusteres), () => {
  debugger
})
debugger